<div>
    <div class="row">
        <div class="col-md-1 padding-r-0">
            <div class=" border-radius ">
                <div class="margin-xs-r  treeview ">
                    <ul class="list-group text-center border-radius">
                        <li class="list-group-item node-orgTree " v-for="(item, index) in visitTypeList" :key="index"
                            @click="switchVisitType(item)"
                            :class="{'vc-node-selected':visitManageInfo.conditions.typeId == item.typeId}">
                            {{item.name}}
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-11">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5>
                        <vc:i18n name="查询条件"></vc:i18n>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">

                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-2">
                            <div class="form-group">
                                <select class="custom-select" v-model="visitManageInfo.conditions.state">
                                    <option selected value="">{{vc.i18n('请选择审核状态','visitManage')}}</option>
                                    <option v-for="(item, index) in stateList" :key="index" :value="item.statusCd">
                                        {{item.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入访客姓名','visitManage')"
                                    v-model="visitManageInfo.conditions.nameLike" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group">
                                <select class="custom-select" v-model="visitManageInfo.conditions.visitGender">
                                    <option selected value="">{{vc.i18n('请选择性别','visitManage')}}</option>
                                    <option value="0">男</option>
                                    <option value="1">女</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入电话号码','visitManage')"
                                    v-model="visitManageInfo.conditions.phoneNumberLike" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入拜访房屋 楼栋-单元-房屋','visitManage')"
                                    v-model="visitManageInfo.conditions.roomNameLike" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryVisitMethod()">
                                <vc:i18n name="查询" namespace="visitManage"></vc:i18n>
                            </button>
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_resetVisitMethod()">
                                <vc:i18n name="重置" namespace="visitManage"></vc:i18n>
                            </button>
                        </div>
                    </div>
                    <div class="row">

                        <div class="col-sm-2">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入拜访业主','visitManage')"
                                    v-model="visitManageInfo.conditions.ownerNameLike" class=" form-control">
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入开始时间','visitManage')"
                                    v-model="visitManageInfo.conditions.queryStartTime"
                                    class=" form-control queryStartTime">
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group">
                                <input type="text" :placeholder="vc.i18n('请输入结束时间','visitManage')"
                                    v-model="visitManageInfo.conditions.queryEndTime"
                                    class=" form-control queryEndTime">
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <vc:i18n name="访客人员" namespace="visitManage"></vc:i18n>
                    </h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_toIotVisit()">
                            <vc:i18n name="管理" namespace="visitManage"></vc:i18n>
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                            <tr>
                                <th class="text-center">
                                    <vc:i18n name='拜访ID' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='姓名' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='性别' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='电话号码' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='拜访房屋' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='拜访业主' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='访客车辆' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='访客类型' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='拜访事由' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='拜访时间' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='离开时间' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='审核状态' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='审核备注' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='创建时间' namespace='visitManage'></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name='操作'></vc:i18n>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="visit in visitManageInfo.visits">
                                <td class="text-center">{{visit.visitId}}</td>
                                <td class="text-center">{{visit.name}}</td>
                                <td class="text-center">
                                    {{visit.visitGender == 0 ? '男' : '女'}}
                                </td>
                                <td class="text-center">{{visit.phoneNumber}}</td>
                                <td class="text-center">{{visit.roomName}}</td>
                                <td class="text-center">{{visit.ownerName || '-'}}</td>
                                <td class="text-center">{{visit.carNum || '-'}}</td>
                                <td class="text-center">{{visit.visitTypeName}}</td>
                                <td class="text-center">{{visit.visitCase || '-'}}</td>
                                <td class="text-center">{{visit.visitTime || '-'}}</td>
                                <td class="text-center">{{visit.departureTime || '-'}}</td>
                                <td class="text-center">{{visit.stateName}}</td>
                                <td class="text-center">{{visit.msg || '-'}}</td>
                                <td class="text-center">{{visit.createTime}}</td>
                                <td class="text-center">
                                    <div class="btn-group">
                                        <button class="btn-white btn btn-xs" v-on:click="_toVisitDetail(visit)">
                                            <vc:i18n name='详情'></vc:i18n>
                                        </button>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>

</div>